```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>两个思想优化90%的代码 - 技术小馆</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        .hero {
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
        }
        .code-block {
            background: #2d2d2d;
            border-radius: 8px;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        }
        .card {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .table-container {
            overflow-x: auto;
        }
        .prose a {
            color: #4f46e5;
            text-decoration: none;
            font-weight: 500;
            border-bottom: 1px dashed #4f46e5;
        }
        .prose a:hover {
            color: #4338ca;
            border-bottom-style: solid;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero py-20 px-4 sm:px-6 lg:px-8">
        <div class="max-w-6xl mx-auto text-center">
            <div class="inline-block px-4 py-2 mb-6 bg-indigo-100 text-indigo-800 rounded-full text-sm font-medium">
                <i class="fas fa-code mr-2"></i>代码优化
            </div>
            <h1 class="text-4xl md:text-5xl lg:text-6xl font-bold text-gray-900 mb-6 leading-tight">
                两个思想优化<span class="text-indigo-600">90%的代码</span>
            </h1>
            <p class="text-xl md:text-2xl text-gray-700 max-w-3xl mx-auto mb-10">
                让代码焕然一新：两个核心技巧提升代码质量
            </p>
            <div class="bg-white rounded-lg shadow-lg p-6 max-w-3xl mx-auto text-left">
                <p class="text-gray-700">
                    <i class="fas fa-quote-left text-indigo-400 mr-2"></i>
                    上周我review新人的代码，看到300行的UserService类里既有密码加密又有地址解析，差点心梗——这哪是写代码，分明是在造屎山。每次维护旧代码都像在迷宫里找出口？试试这两个方法，让你的代码更清晰高效！
                    <i class="fas fa-quote-right text-indigo-400 ml-2"></i>
                </p>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
        <div class="grid grid-cols-1 lg:grid-cols-12 gap-8">
            <!-- Content -->
            <article class="lg:col-span-8 prose prose-lg max-w-none">
                <!-- Common Problems -->
                <div class="bg-yellow-50 border-l-4 border-yellow-400 p-6 rounded-lg mb-12">
                    <h2 class="text-2xl font-bold text-gray-900 mb-4 flex items-center">
                        <i class="fas fa-exclamation-triangle text-yellow-500 mr-3"></i>常见问题自查：
                    </h2>
                    <ul class="list-disc pl-5 space-y-2">
                        <li>一个方法数百行，牵一发而动全身</li>
                        <li>相似代码多处重复，修改时四处漏风</li>
                        <li>类与方法命名随意，可读性差</li>
                    </ul>
                </div>

                <!-- Solutions -->
                <div class="bg-blue-50 border-l-4 border-blue-400 p-6 rounded-lg mb-12">
                    <h2 class="text-2xl font-bold text-gray-900 mb-4 flex items-center">
                        <i class="fas fa-lightbulb text-blue-500 mr-3"></i>优化方案揭秘：
                    </h2>
                    <ul class="list-disc pl-5 space-y-2">
                        <li><strong>模块化拆分：</strong>将复杂逻辑拆解为独立组件</li>
                        <li><strong>模式化抽象：</strong>用设计模式消除重复代码</li>
                    </ul>
                </div>

                <!-- Section 1 -->
                <section class="mb-16">
                    <div class="flex items-center mb-8">
                        <span class="text-5xl font-bold text-indigo-600 mr-4">1</span>
                        <h2 class="text-3xl font-bold text-gray-900">像乐高一样拆解代码（单一职责原则）</h2>
                    </div>
                    
                    <h3 class="text-xl font-semibold text-gray-800 mt-8 mb-4 pl-2 border-l-4 border-red-400">反面教材（某电商系统源码）</h3>
                    <div class="code-block p-4 mb-8">
                        <pre class="text-gray-200 font-mono text-sm overflow-x-auto">
<code>// 灾难级代码：一个方法干五件事
public void processOrder(Order order) {
    // 1.验证参数
    if (order == null) throw new Exception("订单为空");
    
    // 2.计算折扣
    double discount = calculateDiscount(order.getUserId());
    
    // 3.扣减库存
    inventoryService.deduct(order.getSkuId(), order.getQuantity());
    
    // 4.生成流水号
    String serialNo = UUID.randomUUID().toString();
    
    // 5.发送短信
    smsService.send(order.getPhone(), "订单创建成功");
}</code>
                        </pre>
                    </div>

                    <h3 class="text-xl font-semibold text-gray-800 mt-8 mb-4 pl-2 border-l-4 border-green-400">改造后（清晰如乐高）</h3>
                    <div class="code-block p-4 mb-8">
                        <pre class="text-gray-200 font-mono text-sm overflow-x-auto">
<code>// 验证组件
public class OrderValidator {
    public void validate(Order order) { /*...*/ }
}

// 计算组件
public class DiscountCalculator {
    public double calculate(Long userId) { /*...*/ }
}

// 库存组件
public class InventoryOperator {
    public void deductStock(String skuId, int quantity) { /*...*/ }
}

// 主流程（组装乐高）
public void processOrder(Order order) {
    validator.validate(order);
    double discount = discountCalculator.calculate(order.getUserId());
    inventoryOperator.deductStock(order.getSkuId(), order.getQuantity());
    // ...
}</code>
                        </pre>
                    </div>

                    <div class="bg-gray-50 p-6 rounded-lg mb-8">
                        <h4 class="text-lg font-semibold text-gray-800 mb-3">拆分技巧：</h4>
                        <ol class="list-decimal pl-5 space-y-2">
                            <li>每个方法不超过IDE屏幕高度</li>
                            <li>类名用名词，方法名用动词</li>
                            <li>用<code class="bg-gray-200 px-1 rounded">final</code>修饰不可变组件</li>
                        </ol>
                    </div>
                </section>

                <!-- Section 2 -->
                <section class="mb-16">
                    <div class="flex items-center mb-8">
                        <span class="text-5xl font-bold text-indigo-600 mr-4">2</span>
                        <h2 class="text-3xl font-bold text-gray-900">拒绝重复造轮子（DRY原则）</h2>
                    </div>
                    
                    <p class="mb-6">某物流系统因重复代码导致运费计算不一致，我们通过抽象模式解决：</p>

                    <h3 class="text-xl font-semibold text-gray-800 mt-8 mb-4 pl-2 border-l-4 border-red-400">优化前（重复代码）</h3>
                    <div class="code-block p-4 mb-8">
                        <pre class="text-gray-200 font-mono text-sm overflow-x-auto">
<code>// 空运计费
public double airFreightCalc(double weight, double volume) {
    double standardPrice = weight * 8.5;
    if (volume > 2) {
        standardPrice += (volume - 2) * 15;
    }
    return standardPrice * 1.1; // 燃油附加费
}

// 陆运计费
public double landFreightCalc(double weight, double volume) {
    double standardPrice = weight * 3.5;
    if (volume > 5) {
        standardPrice += (volume - 5) * 8;
    }
    return standardPrice * 1.05; 
}</code>
                        </pre>
                    </div>

                    <h3 class="text-xl font-semibold text-gray-800 mt-8 mb-4 pl-2 border-l-4 border-green-400">优化后（模板方法模式）</h3>
                    <div class="code-block p-4 mb-8">
                        <pre class="text-gray-200 font-mono text-sm overflow-x-auto">
<code>abstract class FreightTemplate {
    // 通用计算流程
    public final double calculate(double weight, double volume) {
        double base = basePrice(weight);
        double extra = extraFee(volume);
        return (base + extra) * fuelSurcharge();
    }
    
    abstract double basePrice(double weight);
    abstract double extraFee(double volume);
    abstract double fuelSurcharge();
}

// 空运实现
class AirFreight extends FreightTemplate {
    double basePrice(double w) { return w * 8.5; }
    double extraFee(double v) { return v > 2 ? (v-2)*15 : 0; }
    double fuelSurcharge() { return 1.1; }
}

// 陆运实现
class LandFreight extends FreightTemplate { /* 类似实现 */ }</code>
                        </pre>
                    </div>
                </section>

                <!-- Section 3 -->
                <section class="mb-16">
                    <div class="flex items-center mb-8">
                        <span class="text-5xl font-bold text-indigo-600 mr-4">3</span>
                        <h2 class="text-3xl font-bold text-gray-900">订单中心重构案例</h2>
                    </div>
                    
                    <h3 class="text-xl font-semibold text-gray-800 mt-8 mb-4">重构前痛点</h3>
                    <ul class="list-disc pl-5 space-y-2 mb-6">
                        <li>5000行的<code class="bg-gray-200 px-1 rounded">OrderService</code>类</li>
                        <li>重复的优惠计算逻辑（出现3次）</li>
                        <li>修改发货逻辑需要通读2000行代码</li>
                    </ul>

                    <h3 class="text-xl font-semibold text-gray-800 mt-8 mb-4">重构过程</h3>
                    <ol class="list-decimal pl-5 space-y-2 mb-6">
                        <li><strong>纵向拆分：</strong>按功能拆分为<code class="bg-gray-200 px-1 rounded">OrderValidator</code>、<code class="bg-gray-200 px-1 rounded">PaymentProcessor</code>等12个组件</li>
                        <li><strong>横向抽象：</strong>抽取<code class="bg-gray-200 px-1 rounded">AbstractDiscountStrategy</code>处理各类优惠</li>
                        <li><strong>模式应用：</strong>用策略模式实现多平台运费计算</li>
                    </ol>

                    <div class="code-block p-4 mb-8">
                        <pre class="text-gray-200 font-mono text-sm overflow-x-auto">
<code>// 策略模式实现多平台运费
public interface ShippingStrategy {
    double calculate(Order order);
}

public class SFShipping implements ShippingStrategy {
    public double calculate(Order order) {
        return order.getWeight() * 5 + order.getVolume() * 2;
    }
}

public class JDShipping implements ShippingStrategy {
    public double calculate(Order order) {
        return Math.max(order.getWeight() * 3, order.getVolume() * 8);
    }
}</code>
                        </pre>
                    </div>

                    <h3 class="text-xl font-semibold text-gray-800 mt-8 mb-4">重构效果</h3>
                    <div class="table-container mb-8">
                        <table class="min-w-full divide-y divide-gray-200">
                            <thead class="bg-gray-50">
                                <tr>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">指标</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">重构前</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">重构后</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">提升</th>
                                </tr>
                            </thead>
                            <tbody class="bg-white divide-y divide-gray-200">
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">代码行数</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12,000</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">3,200</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-green-600 font-medium">73%↓</td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">单元测试覆盖率</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">35%</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">82%</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-green-600 font-medium">134%↑</td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">新增需求耗时</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">3人日</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">0.5人日</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-green-600 font-medium">83%↓</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </section>

                <!-- Section 4 -->
                <section class="mb-16">
                    <div class="flex items-center mb-8">
                        <span class="text-5xl font-bold text-indigo-600 mr-4">4</span>
                        <h2 class="text-3xl font-bold text-gray-900">工具加持让优化事半功倍</h2>
                    </div>
                    
                    <h3 class="text-xl font-semibold text-gray-800 mt-8 mb-4">IDEA必备插件</h3>
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-8">
                        <div class="card bg-white p-6 rounded-lg shadow">
                            <div class="flex items-center mb-3">
                                <div class="w-10 h-10 rounded-full bg-purple-100 flex items-center justify-center mr-3">
                                    <i class="fas fa-map-marked-alt text-purple-600"></i>
                                </div>
                                <h4 class="font-semibold text-gray-800">CodeGlance</h4>
                            </div>
                            <p class="text-gray-600 text-sm">代码地图快速定位</p>
                        </div>
                        <div class="card bg-white p-6 rounded-lg shadow">
                            <div class="flex items-center mb-3">
                                <div class="w-10 h-10 rounded-full bg-red-100 flex items-center justify-center mr-3">
                                    <i class="fas fa-bug text-red-600"></i>
                                </div>
                                <h4 class="font-semibold text-gray-800">SpotBugs</h4>
                            </div>
                            <p class="text-gray-600 text-sm">检测潜在坏味道</p>
                        </div>
                        <div class="card bg-white p-6 rounded-lg shadow">
                            <div class="flex items-center mb-3">
                                <div class="w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center mr-3">
                                    <i class="fas fa-project-diagram text-blue-600"></i>
                                </div>
                                <h4 class="font-semibold text-gray-800">SequenceDiagram</h4>
                            </div>
                            <p class="text-gray-600 text-sm">自动生成调用时序图</p>
                        </div>
                    </div>

                    <h3 class="text-xl font-semibold text-gray-800 mt-8 mb-4">Maven配置示例</h3>
                    <div class="code-block p-4 mb-8">
                        <pre class="text-gray-200 font-mono text-sm overflow-x-auto">
<code>&lt;plugin&gt;
    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
    &lt;artifactId&gt;maven-checkstyle-plugin&lt;/artifactId&gt;
    &lt;configuration&gt;
        &lt;configLocation&gt;google_checks.xml&lt;/configLocation&gt;
    &lt;/configuration&gt;
&lt;/plugin&gt;</code>
                        </pre>
                    </div>
                </section>

                <!-- Section 5 -->
                <section class="mb-16">
                    <div class="flex items-center mb-8">
                        <span class="text-5xl font-bold text-indigo-600 mr-4">5</span>
                        <h2 class="text-3xl font-bold text-gray-900">新手常犯的5个错误</h2>
                    </div>
                    
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                        <div class="card bg-white p-6 rounded-lg shadow">
                            <h4 class="font-semibold text-gray-800 mb-2 flex items-center">
                                <span class="w-6 h-6 rounded-full bg-red-100 text-red-600 flex items-center justify-center mr-2">1</span>
                                过度拆分
                            </h4>
                            <p class="text-gray-600 text-sm">（把1个方法拆成10个碎片）</p>
                        </div>
                        <div class="card bg-white p-6 rounded-lg shadow">
                            <h4 class="font-semibold text-gray-800 mb-2 flex items-center">
                                <span class="w-6 h-6 rounded-full bg-red-100 text-red-600 flex items-center justify-center mr-2">2</span>
                                伪抽象
                            </h4>
                            <p class="text-gray-600 text-sm">（为抽象而抽象增加复杂度）</p>
                        </div>
                        <div class="card bg-white p-6 rounded-lg shadow">
                            <h4 class="font-semibold text-gray-800 mb-2 flex items-center">
                                <span class="w-6 h-6 rounded-full bg-red-100 text-red-600 flex items-center justify-center mr-2">3</span>
                                忽视可测试性
                            </h4>
                            <p class="text-gray-600 text-sm">（紧耦合无法单元测试）</p>
                        </div>
                        <div class="card bg-white p-6 rounded-lg shadow">
                            <h4 class="font-semibold text-gray-800 mb-2 flex items-center">
                                <span class="w-6 h-6 rounded-full bg-red-100 text-red-600 flex items-center justify-center mr-2">4</span>
                                盲目设计模式
                            </h4>
                            <p class="text-gray-600 text-sm">（用观察者模式处理简单回调）</p>
                        </div>
                        <div class="card bg-white p-6 rounded-lg shadow col-span-1 md:col-span-2">
                            <h4 class="font-semibold text-gray-800 mb-2 flex items-center">
                                <span class="w-6 h-6 rounded-full bg-red-100 text-red-600 flex items-center justify-center mr-2">5</span>
                                忽略文档
                            </h4>
                            <p class="text-gray-600 text-sm">（三个月后看不懂自己的代码）</p>
                        </div>
                    </div>
                </section>

                <!-- Section 6 -->
                <section class="mb-16">
                    <div class="flex items-center mb-8">
                        <span class="text-5xl font-bold text-indigo-600 mr-4">6</span>
                        <h2 class="text-3xl font-bold text-gray-900">从CRUD到架构师的跃迁</h2>
                    </div>
                    
                    <h3 class="text-xl font-semibold text-gray-800 mt-8 mb-4">代码优化的三个境界</h3>
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
                        <div class="card bg-gradient-to-br from-yellow-100 to-yellow-50 p-6 rounded-lg shadow">
                            <h4 class="font-bold text-gray-800 mb-2">青铜</h4>
                            <p class="text-gray-600 text-sm">能用就行（面向过程编程）</p>
                        </div>
                        <div class="card bg-gradient-to-br from-blue-100 to-blue-50 p-6 rounded-lg shadow">
                            <h4 class="font-bold text-gray-800 mb-2">黄金</h4>
                            <p class="text-gray-600 text-sm">模块清晰（面向对象编程）</p>
                        </div>
                        <div class="card bg-gradient-to-br from-purple-100 to-purple-50 p-6 rounded-lg shadow">
                            <h4 class="font-bold text-gray-800 mb-2">王者</h4>
                            <p class="text-gray-600 text-sm">领域驱动（业务语义化）</p>
                        </div>
                    </div>

                    <h3 class="text-xl font-semibold text-gray-800 mt-8 mb-4">性能对比实验</h3>
                    <div class="code-block p-4 mb-8">
                        <pre class="text-gray-200 font-mono text-sm overflow-x-auto">
<code>// 原始代码（耗时120ms）
public void batchProcess(List&lt;Order&gt; orders) {
    for (Order o : orders) {
        validate(o);
        calculate(o);
        save(o);
    }
}

// 优化后（耗时45ms）
public void batchProcess(List&lt;Order&gt; orders) {
    List&lt;Order&gt; validOrders = orders.stream().filter(this::validate).collect(toList());
    List&lt;Order&gt; calculatedOrders = validOrders.stream().peek(this::calculate).collect(toList());
    repository.saveAll(calculatedOrders);
}</code>
                        </pre>
                    </div>

                    <div class="bg-gray-50 p-6 rounded-lg">
                        <h4 class="text-lg font-semibold text-gray-800 mb-3">优化技巧：</h4>
                        <ul class="list-disc pl-5 space-y-2">
                            <li>批量处理代替循环单条</li>
                            <li>并行流加速（注意线程安全）</li>
                            <li>预编译SQL语句</li>
                        </ul>
                    </div>
                </section>
            </article>

            <!-- Sidebar -->
            <aside class="lg:col-span-4 space-y-8">
                <!-- Author Card -->
                <div class="card bg-white p-6 rounded-lg shadow-lg">
                    <div class="flex items-center">
                        <div class="w-16 h-16 rounded-full bg-indigo-100 flex items-center justify-center mr-4">
                            <i class="fas fa-user-tie text-indigo-600 text-2xl"></i>
                        </div>
                        <div>
                            <h3 class="font-bold text-gray-900">技术专家</h3>
                            <p class="text-gray-600 text-sm">10年架构经验</p>
                        </div>
                    </div>
                    <div class="mt-4 border-t pt-4">
                        <p class="text-gray-600 text-sm">专注于企业级系统架构与代码优化，帮助多家公司重构遗留系统，提升开发效率。</p>
                    </div>
                </div>

                <!-- Summary Card -->
                <div class="card bg-white p-6 rounded-lg shadow-lg">
                    <h3 class="font-bold text-gray-900 mb-4 flex items-center">
                        <i class="fas fa-bookmark text-indigo-500 mr-2"></i>核心要点
                    </h3>
                    <ul class="space-y-3">
                        <li class="flex items-start">
                            <span class="flex items-center justify-center w-5 h-5 bg-indigo-100 text-indigo-600 rounded-full text-xs font-bold mr-3 mt-1">1</span>
                            <span class="flex-1 text-gray-700">单一职责：每个类/方法只做一件事</span>
                        </li>
                        <li class="flex items-start">
                            <span class="flex items-center justify-center w-5 h-5 bg-indigo-100 text-indigo-600 rounded-full text-xs font-bold mr-3 mt-1">2</span>
                            <span class="flex-1 text-gray-700">DRY原则：消除重复代码</span>
                        </li>
                        <li class="flex items-start">
                            <span class="flex items-center justify-center w-5 h-5 bg-indigo-100 text-indigo-600 rounded-full text-xs font-bold mr-3 mt-1">3</span>
                            <span class="flex-1 text-gray-700">模式应用：合适的设计模式</span>
                        </li>
                        <li class="flex items-start">
                            <span class="flex items-center justify-center w-5 h-5 bg-indigo-100 text-indigo-600 rounded-full text-xs font-bold mr-3 mt-1">4</span>
                            <span class="flex-1 text-gray-700">工具辅助：善用IDE插件</span>
                        </li>
                    </ul>
                </div>

                <!-- Diagram -->
                <div class="card bg-white p-6 rounded-lg shadow-lg">
                    <h3 class="font-bold text-gray-900 mb-4 flex items-center">
                        <i class="fas fa-project-diagram text-blue-500 mr-2"></i>代码优化流程图
                    </h3>
                    <div class="mermaid">
                        graph TD
                            A[开始] --> B{代码检查}
                            B -->|问题代码| C[识别坏味道]
                            B -->|整洁代码| D[无需优化]
                            C --> E[制定优化策略]
                            E --> F[模块化拆分]
                            E --> G[模式化抽象]
                            F --> H[编写单元测试]
                            G --> H
                            H --> I[验证重构]
                            I -->|成功| J[提交代码]
                            I -->|失败| K[回滚调整]
                    </div>
                    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
                </div>

                <!-- Resources -->
                <div class="card bg-white p-6 rounded-lg shadow-lg">
                    <h3 class="font-bold text-gray-900 mb-4 flex items-center">
                        <i class="fas fa-book text-green-500 mr-2"></i>推荐阅读
                    </h3>
                    <ul class="space-y-3">
                        <li>
                            <a href="#" class="text-indigo-600 hover:text-indigo-800 text-sm flex items-center">
                                <i class="fas fa-external-link-alt mr-2 text-xs"></i>
                                重构：改善既有代码的设计
                            </a>
                        </li>
                        <li>
                            <a href="#" class="text-indigo-600 hover:text-indigo-800 text-sm flex items-center">
                                <i class="fas fa-external-link-alt mr-2 text-xs"></i>
                                代码整洁之道
                            </a>
                        </li>
                        <li>
                            <a href="#" class="text-indigo-600 hover:text-indigo-800 text-sm flex items-center">
                                <i class="fas fa-external-link-alt mr-2 text-xs"></i>
                                设计模式：可复用面向对象软件的基础
                            </a>
                        </li>
                    </ul>
                </div>
            </aside>
        </div>
    </main>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-8 px-4">
        <div class="max-w-6xl mx-auto flex flex-col md:flex-row justify-between items-center">
            <div class="mb-4 md:mb-0">
                <h3 class="text-xl font-bold text-white mb-2">技术小馆</h3>
                <p class="text-sm">专业的开发者知识分享平台</p>
            </div>
            <div>
                <a href="http://www.yuque.com/jtostring" class="text-indigo-300 hover:text-white transition-colors duration-200">
                    <i class="fas fa-globe mr-2"></i>www.yuque.com/jtostring
                </a>
            </div>
        </div>
    </footer>

    <script>
        // Initialize Mermaid
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: false,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>
```